package com.tema2.Lab4.Ex1;

public class Sequence1 {
	private Integer firstNumber;
	private Integer secondNumber;
	private Integer nextNumber;

	public Sequence1() {
		this.firstNumber = 0;
		this.secondNumber = 1;
	}
	/**
	 * Metodo encargado de mostrar la secuencia 
	 * 
	 */
	public void displaySequence() {
		System.out.println(firstNumber.toString());
		System.out.println(secondNumber.toString());
		nextNumber = firstNumber + secondNumber;
		while (nextNumber <= 100) {
			System.out.println(nextNumber);
			firstNumber=secondNumber;
			secondNumber=nextNumber;
			nextNumber=firstNumber+secondNumber;
		}
	}
}
